package com.kob.backend.controller.product;

import com.kob.backend.service.product.ProductDeleteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
@RestController
public class ProductDeleteController {
    @Autowired
    private ProductDeleteService productDeleteService;
    @PostMapping("/product/delete/")
    public void deleteproduct(@RequestParam Map<String,String> map){
        Integer id=Integer.parseInt(map.get("productid"));
        productDeleteService.deleteproduct(id);
    }
}
